package com.ynet.middleground.user.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 机构/部门/角色/关系
 * </p>
 *
 * @author Wangxz
 * @since 2019-11-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ur_organizational_role_relation")
public class OrganizationalRoleRelation extends Model<OrganizationalRoleRelation> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 角色id
     */
    private Integer roleId;

    /**
     * 机构/部门id
     */
    private Integer organizationalId;

    /**
     * 描述
     */
    private String describeStr;

    /**
     * 渠道
     */
    private String channel;

    /**
     * 创建时间
     */
    private LocalDateTime gmtCreate;

    /**
     * 创建人
     */
    private Integer createBy;

    /**
     * 修改时间
     */
    private LocalDateTime gmtModified;

    /**
     * 修改人
     */
    private Integer modifiedBy;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
